




message("xxxxxx" ${CMAKE_CURRENT_SOURCE_DIR})

# LUA_FOUND
# LUA_INCLUDE_DIRS
# LUA_LIBRARIES
find_library(LUA_LIBRARIES
    NAMES lua
    PATHS
        ${CMAKE_CURRENT_SOURCE_DIR}/../../third_part/prebuild/mac/lua/lib
    NO_DEFAULT_PATH  # 不搜默认路径
)

find_path(LUA_INCLUDE_DIRS
    lua.h
    ${CMAKE_CURRENT_SOURCE_DIR}/../../third_part/prebuild/mac/lua/include
)
message(${LUA_LIBRARIES})
message(${LUA_INCLUDE_DIRS})


find_path(SOL2_INCLUDE_DIRS
    sol/sol.hpp
    ${CMAKE_CURRENT_SOURCE_DIR}/../../third_part/prebuild/mac/sol2/include)


include_directories(${LUA_INCLUDE_DIRS} ${SOL2_INCLUDE_DIRS})

add_executable(xlua xlua_main.cc)
target_link_libraries(xlua ${LUA_LIBRARIES})